<HTML><HEAD><TITLE>ic_stat_register_event(++Event, ++Description)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(ic_kernel)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>ic_stat_register_event(++Event, ++Description)</H1>
Registers a new stats event to be collected
<DL>
<DT><EM>Event</EM></DT>
<DD>The short name of the event
</DD>
<DT><EM>Description</EM></DT>
<DD>The long name of the event
</DD>
</DL>
<H2>Description</H2>
<P>
   When a program wishes to record events of interest throughout its runtime
   it can do so by first registering the event type with the stats logger at
   the beginning of the program.  E.g.
<PRE>
	ic_stat_register_event('myevent','My really important event').
</PRE>
   Calls to ic_event/1 can then be inserted in the appropriate places
   throughout the code.  E.g.
<PRE>
	foo:-
		ic_event('myevent'),
		bar(X).	
</PRE>
   While stats gathering is not enabled (i.e. without the program explicitly
   calling <TT>ic_stat(on)</TT>) these events are processed very efficiently, and so
   can be left in code without incurring any significant overhead.

<H2>See Also</H2>
<A HREF="../../lib/ic_kernel/ic_stat-1.html">ic_stat / 1</A>, <A HREF="../../lib/ic_kernel/ic_stat_get-1.html">ic_stat_get / 1</A>, <A HREF="../../lib/ic_kernel/ic_event-1.html">ic_event / 1</A>
</BODY></HTML>
